const { createProxyMiddleware } = require('http-proxy-middleware');

module.exports = function(app) {
  app.use('/api',
    createProxyMiddleware({
      target: 'http://localhost:9999',
      changeOrigin: true,
    })
  );
  app.use('/files',
    createProxyMiddleware({
      target: 'http://localhost:9999',
      changeOrigin: true,
    })
  );
  app.use('/articles',
  createProxyMiddleware({
    target: 'http://localhost:9999',
    changeOrigin: true,
  }),
);
app.use('/graphql',
  createProxyMiddleware({
    target: 'http://localhost:9999',
    changeOrigin: true,
  }),
);
};